#ifndef _RENDERTEXTURECLASS_H_
#define _RENDERTEXTURECLASS_H_


#include <d3d11.h>
#include <d3dx10math.h>


class RenderTextureClass
{
public:
	RenderTextureClass();
	~RenderTextureClass();

	bool Initialize(ID3D11Device*, int, int, float, float);
	void Shutdown();

	void SetRenderTarget(ID3D11DeviceContext*);
	ID3D11RenderTargetView* GetRenderTarget() 
	{
		return m_renderTargetView;
	};

	void ClearRenderTarget(ID3D11DeviceContext*, float, float, float, float);
	ID3D11ShaderResourceView* GetShaderResourceView();
	ID3D11ShaderResourceView* GetDepthShaderResourceView();

	void GetProjectionMatrix(D3DXMATRIX&);
	void GetOrthoMatrix(D3DXMATRIX&);

	int GetTextureWidth();
	int GetTextureHeight();

private:
	UINT						m_textureWidth, m_textureHeight;
	ID3D11Texture2D				*m_renderTargetTexture;
	ID3D11RenderTargetView		*m_renderTargetView;
	ID3D11ShaderResourceView	*m_shaderResourceView;
	ID3D11Texture2D				*m_depthStencilBuffer;
	ID3D11DepthStencilView		*m_depthStencilView;
	ID3D11ShaderResourceView	*m_depthResourceView;
	D3D11_VIEWPORT				m_viewport;
	D3DXMATRIX					m_projectionMatrix;
	D3DXMATRIX					m_orthoMatrix;
};

#endif